function PagingController(totalRecords){
	PagingController.prototype.totalRecords = totalRecords;
	PagingController.prototype.currentPage = 1;
	PagingController.prototype.recordsPerPage = 5;
}
PagingController.prototype.moveNext = function() {
	if (this.nextEnabled())
		this.currentPage=this.currentPage+1;
}
PagingController.prototype.movePrevious = function() {
	if (this.previousEnabled())
		this.currentPage=this.currentPage-1;
}
PagingController.prototype.previousEnabled = function() {	
	return this.getCurrentPageStartIndex()>0;
}
PagingController.prototype.nextEnabled = function() {
	return this.getCurrentPageEndIndex()<this.totalRecords;
}
PagingController.prototype.getCurrentPageStartIndex = function() {
	return (this.currentPage - 1) * this.recordsPerPage;
}
PagingController.prototype.getCurrentPageEndIndex = function() {
	return this.getCurrentPageStartIndex() + this.recordsPerPage - 1;
}
PagingController.prototype.GetPageDescription = function() {
	return (this.getCurrentPageStartIndex()+1).toString() + ' - ' + (this.getCurrentPageEndIndex() + 1).toString() + ' / ' +(this.totalRecords).toString();
}